package cn.dnui_zzh807.dnuifood_16110100807.service;

import java.util.List;

import cn.dnui_zzh807.dnuifood_16110100807.bean.CommentInfo;
import cn.dnui_zzh807.dnuifood_16110100807.bean.LoginBean;
import cn.dnui_zzh807.dnuifood_16110100807.bean.ResultBean;
import cn.dnui_zzh807.dnuifood_16110100807.bean.UserInfo;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by Dobby on 2018/10/15.
 */

public interface UserService {
    @GET("userLogin.do")
    Call<LoginBean> userLogin(@Query("username")String username, @Query("userpass")String userpass);

    @GET("userRegister.do")
    Call<ResultBean> register(
            @Query("username")String username,
            @Query("userpass")String userpass,
            @Query("mobilenum")String mobilenum,
            @Query("address")String address,
            @Query("comment")String comment
    );

    @GET("getUserById.do")
    Call<UserInfo>  getUserById(
            @Query("user_id") String user_id
    );

    @GET("updateUserById.do")
    Call<ResultBean> updateUserById(
            @Query("user_id")String user_id,
            @Query("username")String username,
            @Query("userpass")String userpass,
            @Query("mobilenum")String mobilenum,
            @Query("address")String address
    );


    @GET("getAllOrdersByUser.do")
    Call<List<CommentInfo>> getAllOrdersByUser(
            @Query("user_id") String user_id
    );

    @GET("getAllCommentsByUser.do")
    Call<List<CommentInfo>> getAllCommentsByUser(
            @Query("user_id") String user_id
    );




}
